For my day job I'm a communications officer/science writer for a department at a major university. Ten years ago the director, my boss, co-wrote a book with the then-director. It didn't differentiate itself very well; sales were low.
Now, the agent and my boss want to try again, this time with a series (the first book was both too big and too shallow). As the resident writer, I get to help. It is likely I will be doing the bulk of the work for at least the first book.
My boss is a wonderful, collaborative, and humble person who will probably want to credit me on the cover with her. I imagine the publishers will balk at this - the platform comes from reputation of the university, department and my boss. If I were an established journalist with ten years of bylines, it would be different.
Professionally, of course I would like public credit for the work. We'll likely move in 2-3 years, and I will probably freelance again - being co-author on a series like this would be huge.
1. Aside from doing good research, being timely, and writing well, is there any other aspect to impressing the pants off the agent? She is lovely, by the way, and I'm excited to work with her.
Meeting deadlines is critical. Writing well too. Asking questions when you're not sure of something is also good. I'm sure she'd rather have you ask, than have to solve a problem created by a mistake made cause you didn't know.
It won't hurt to have a passing familiarity with the books she's sold too. You can't read them all but knowing what they are is a good piece of info to have.
2. What kind of credit can I reasonably aim for? If it's not credited publicly, how can I use this work in my non-fiction portfolio later?
You can ask for credit on the cover. Cover credit includes several possibilities.
Department head AND (You)
Department head with (you)
If you don't get cover credit you simply list it as a work for hire on your CV (which sounds like what it is since it's part of your job)
3A. If I do manage to impress the agent, and I leave in two or three years, could I let her know I'm ghostwriting as a freelancer, in case one of her clients is looking?
3B What are the chances of continuing to be the primary writer for the series even if I leave the department?3A: Yes of course.
3B: not a clue. That's a political decision inside the department and not anything I can predict. However. Make yourself essential and it's hard to see how they'd want to change writers mid-series.
4. because I write fiction, too, do agents ever talk cross category? Say if Ms. LovelyAgent is having a drink at a conference and Ms.FictionAgent mentions they are reading my full, would she ever say - "I've been working with her on a non-fiction project, she's great" - or are the two worlds too separate to matter? (Her agency is exclusively non-fiction).
I'm always amused when writers think we talk about them at cocktails.
We kvetch about editors.
Your ace in the hole here is that Lovely Agent knows you. When the time comes, you say to her, I'm going to be looking for an agent for my novel. Do you have any reccs. Coming to an agent by way of a recc from Lovely is much better than any drunken gossip would be.
You'd query with "I got your name from Agent Lovely, with whom I worked on (Title)."