I post mostly on the Family Law board. That's where legal issues of separation and divorce are discussed and only members who are logged in can view those threads. You can post there when you're ready to pursue the idea of becoming your child's primary parent. BPD is a mood dysregulation Personality Disorder, that means her moods can change in the blink of an eye due to a
perceived slight, trigger or trauma. Even if you managed to get in a signed and notarized statement that she would agree to let your child live elsewhere with you, likely the court would require her to confirm it later in a court hearing. In most cases it isn't easy to know in advance whether the person with BPD (pwBPD) will recant or confirm when the decision comes down to the wire.
Good that you've sought legal advice from a family law attorney. Most attorneys aren't familiar with specific PDs. They just call them crazy, unstable, high conflict, etc. Part of the reason is that even the family courts generally avoid seeking a diagnostic label for problem parents and don't try to fix them, instead they stick to the behaviors and behavior patterns. The difficulty is that much of the blaming, blame shifting, denials, chaos, instability, invalidation of the children, etc is not considered to rise to the level of being "actionable". This is not to say you can't become the primary parent but there are hurdles because mothers often get default but unwritten preference. Are you on your child's birth certificate? If so then likely you wouldn't have to take a DNA test, well, unless she contests you're the father. Stranger things have happened.
Also, be aware that not all lawyers are experienced enough to handle difficult cases. You need someone more than a form filer and a hand holder. You lawyer should be proactive to stand up for your needs but also very familiar with the court's way of handling such issues. Hopefully she will be agreeable to your goals and the extra precautions turn out to be unnecessary but you still have to be well prepared if it turns out she's really spiteful and obstructive.
However, if you and your lawyer are aware of typical PD behaviors you can plan and strategize better. You'll be able to make
more informed and
more confident decisions. A good reference to inform yourself as well as the lawyer is the website
www.HighConflictInstitute.com created by William Eddy. He's a social worker, mediator, lawyer, writer and lecturer to family law professionals. He has fabulous Cred. He and Randi Kreger wrote "Splitting: Protecting Yourself While Divorcing Someone With Borderline or Narcissistic Personality Disorder". Is is among our most highly recommended books to read and study when pondering heading to court.
Your consultations with a lawyer are fully confidential. You have a right to privacy. You don't have to confess it under late night interrogations, no matter how guilty and obligated she tries to make you feel. Yes, if you're trying to rescue a relationship sharing is required, but if it has failed then you do need to keep your resources, strategies and options confidential.